<?php

if(!isset($_SESSION))
	session_start();

include_once "metier/connexion.php";

include_once "metier/succeserreurs.php";

?>

<!DOCTYPE html>
<html lang="fr">
	<head>
		<title>Petites annonces</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="css/defaut.css">
		<script language="Javascript" src="js/fonctions.js"></script>
		<script language="Javascript" src="js/sha512.js"></script>
	</head>
	<body>
		<div>
			<h2><a href="index.php">Petites Annonces</a></h2>
			<?php if(estConnecte())
				echo "<p>Connecté en tant que ".$_SESSION["courriel"]." - <a href=\"profile.php\">Mon compte</a> - <a href=\"creerAnnonce.php\">Créer une annonce</a> - <a href=\"deconnexion.php\">Se déconnecter</a></p>";
			else
				echo "<p><a href=\"inscription.php\">S'inscrire</a> - <a href=\"connexion.php\">Se connecter</a></p>";
			?>
		</div>